const Router = require('koa-router');
const {remindersModels} = require('../models/remindersModels');
const router = new Router({
  prefix:'/api/reminders'
})

router.get('/list', async (ctx) => { 
  try {
    const res = await remindersModels.findAll();
    ctx.body = {
      code:200,
      message:'获取提醒数据成功',
      data:res
    }
  } catch (error) {
    ctx.body = {
      code:500,
      message:'获取提醒数据失败',
      error:error.message
    }
  }
});

module.exports = router;